package com.hvgroup.modules.sanic.domain.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @migratedFrom Python
 * @source constants/code_enum.py
 * @originalClass DiFyAppEnum
 * @description DiFy 应用标识（App-Key）枚举
 */
@Getter
@AllArgsConstructor
public enum DiFyAppEnum {
    DATABASE_QA("DATABASE_QA", "数据问答"),
    FILEDATA_QA("FILEDATA_QA", "表格问答"),
    COMMON_QA("COMMON_QA", "通用问答"),
    REPORT_QA("REPORT_QA", "报告问答");

    private final String code;
    private final String description;

    public static DiFyAppEnum getEnumByCode(String code) {
        for (DiFyAppEnum appEnum : DiFyAppEnum.values()) {
            if (appEnum.getCode().equals(code)) {
                return appEnum;
            }
        }
        return COMMON_QA;
    }

}